Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added build tag to include version info in Docker build #983

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

kian99
Copy link
Contributor

@kian99 kian99 commented Jul 3, 2023

Description

Fix the build of the JIMM binary in the Dockerfile to include version info. Also added a log when the service starts to output the version and commit hash. Removed the -race flag since this this binary is part of the production build.

These changes will land in feature-rebac in a separate pr when main is merged into feature-rebac.

Engineering checklist

Check only items that apply

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

@@ -32,6 +33,10 @@ func main() {

// start initialises the jimmsrv service.
func start(ctx context.Context, s *service.Service) error {
zapctx.Info(ctx, "jimm info",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this since it's available via /debug/info endpoint?

Copy link
Contributor Author

@kian99 kian99 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice for seeing in the logs especially when you can't get the server to start due to missing config, at least this way you have a way to see what version of the server is running, will prevent some confusion in the future I'm sure.

@kian99 kian99 merged commit 1700cee into canonical:main Jul 4, 2023
@kian99 kian99 deleted the fix-k8s-version-info branch July 4, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants